This patent specification contains material which is subject to copyright protection. The copyright owner has no objection to the reproduction of this patent specification or related materials from associated patent office files for the purposes of review, but otherwise reserves all copyright whatsoever.
The present invention relates generally to conversions between colour spaces and, in particular, to the provision of a generalised colour space management and conversion tool that enables optimised work between arbitrary colour spaces. The present invention also relates to a method and apparatus for colour space management and conversion. The invention also relates to a computer program product including a computer readable medium having recorded thereon a computer program for colour space management and conversion.
Modem computer systems are progressively required to support more and more colour spaces, with many of those colour spaces being derived from the calibrations of scanners, printers, and monitors, each of which may be described in a variety of forms. For effective and accurate operation, computer systems must be able to convert data between any of these colour spaces efficiently and accurately. The programming task of supporting efficient colour space conversions grows as the square of the number of colour spaces supported unless some generalised scheme is employed.
One shortcut is to implement only conversions to and from some standard colour space. CIE XYZ is an example of one standard colour space that may be used in such a manner, amongst others. However, such requires that two conversions be performed for most colour space conversions. In particular, one conversion from the source colour space into the standard space and another conversion out of the standard colour space into the target colour space. Since colour conversions generally involve individual conversion of every pixel in an image, the efficiency of the conversion is often extremely important.
Further, the technology required to perform such conversions varies over different computer platforms and is also rapidly changing. The required accuracy for such conversions also varies between computer systems.
As understood by the present inventor, prior art colour conversion systems may operate using one of two arrangements. A first arrangement involves having a conversion function between two colour spaces stored in memory whereby individual conversions are performed by examining discrete values form the memory. This is effectively a look-up table. This arrangement has a number of problems. Importantly, at least one table is required to be known for each colour space conversion to be performed, thus constraining the scope of conversions and giving rise to a need to store a large number of values so as to be generally useful. In addition to occupying large amounts of memory, such increases access times causing the conversion to proceed more slowly. Look-up tables are also constrained by fixed limitations of accuracy.
A second arrangement involves mathematically calculating the conversion function for each colour value to be converted. Whilst avoiding the memory problem of the above arrangement, this can increase the conversion time for complicated functions. Further, such requires processors dedicated or configurable to specific conversions, which again may constrain the number of conversion functions required to be handled.
A further issue associated with colour conversion is the time at which the conversion takes place. The look-up table approach described above in fact implements the conversion function off-line, which results in the formation of the table in memory. A mere look-up of the table can then occur at run-time (ie. when individual conversions are required). The calculation approach is performed at run-time, but may be slow, particularly where the computing platform is not configured to efficiently handle the required accuracy of colour conversion. In some cases, the two approached may be married where, upon loading the particular application, the calculation approach is used to create conversion tables used by the application at run-time. Such an approach is some way addresses the problems of permanent storage and conversion speed.
It is an object of the present invention to substantially overcome, or at least ameliorate, one or more deficiencies associated with existing colour space conversion approaches so a to optimise the colour conversion process.
According to a first aspect of the invention, there is provided a method of optimising conversions between colour spaces, said method comprising the steps of:
(i) identifying a set of mathematical functions which, when performed in sequence, implement said conversions between colour spaces;
(ii) identifying a set of computational operations for evaluation using a computing device, said operations, when performed in (first) sequence cause said colour conversions;
(iii) identifying at least one particular sequence of said mathematical functions which when preformed converts colours between a first colour space and a second colour space;
(iv) transforming said particular sequence into a (second) sequence of computational operations chosen from said set of computational operations having substantially the same transformation effect as said particular sequence.
Preferably, steps (iii) and (iv) are performed at a time at which a colour conversion is requested (run-time).
According to a another aspect of the invention, there is provided a method of sequentially combining two sequences of mathematical functions to form a single sequence which has the same effect of said two when executed, said method comprising the steps of:
(a) comparing a last function of a first said sequence and a first function of a second said sequence;
(b) removing both said functions from said lists if said functions are the mathematical inverse of one another;
(c) repeating steps (a) and (b) until the two said functions are not the mathematical inverse of one another; and
(d) combining the two sequences at a current last function of the first sequence and at a current first function of the second sequence.
According to another aspect of the invention, there is provided an apparatus for implementing the aforementioned methods.
According to another aspect of the invention there is provided computer program product including a computer readable medium having recorded thereon a computer program for implementing the methods. Other aspects of the invention are also disclosed.